package com.ids.daoManager;

import java.sql.SQLException;
import com.ids.bean.ForgotPassword;
import com.ids.bean.UserInfo;
import com.ids.dao.LoginDao;


public class LoginDaoManager {
	private static LoginDaoManager instance = new LoginDaoManager();

	public static LoginDaoManager getInstance() {
		return instance;
	}

	public UserInfo getUserInfo(String empCode, String password,boolean isEncrypted) {
		UserInfo userInfo = LoginDao.getInstance().getUser(empCode, password, isEncrypted);
		return userInfo;
	}

	public boolean changePassword(String empCode, String password,
			String newPassword) {
		return LoginDao.getInstance().updatePassword(empCode, password,newPassword);
	}

	public ForgotPassword forgotPassword(String empid) throws SQLException {
		return  LoginDao.getInstance().forgetPassword(empid);
	}
	
	public String updateExpired1(String empCode) {
		return  LoginDao.getInstance().updateExpired1(empCode);
	}

	public String recoverPassword(String newPassword, String confirmPassword,
			String empCode, String key) throws Exception {
		return  LoginDao.getInstance().recoverPassword( newPassword, confirmPassword, empCode, key);
	}

}
	
	

